import axios from 'axios'
import type { AxiosRequestConfig } from 'axios'
// axios.defaults.headers["Authorization"] = 'Bearer '+sessionStorage.getItem("token")
const request  = axios.create({
  baseURL:'http://dida100.com:8888',
  timeout:500
})

request.interceptors.request.use((config:AxiosRequestConfig):any=>{
  config.headers = {
    ...config.headers,
    "Authorization":'Bearer '+ sessionStorage.getItem("token")
  }
  return config;
})
 
export default  request;